package com.SDU.policedispatch.service.impl.schedule;

import com.SDU.policedispatch.entity.Schedules;
import com.SDU.policedispatch.mapper.ScheduleMapper;
import com.SDU.policedispatch.service.schedule.DutyListService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class DutyListServiceImpl implements DutyListService {
    @Autowired
    private ScheduleMapper scheduleMapper;
    @Override
    public List<Schedules> getSchedulesByDate(String date) {
        QueryWrapper<Schedules> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("schedule_date", date);
        return scheduleMapper.selectList(queryWrapper);
    }
}
